import pymysql


class Mysql:
    """mysql连接"""

    def __init__(self, localhost, port, user, password, database_name):
        self.connection = pymysql.connect(
            host=localhost,
            user=user,
            port=port,
            password=password,
            database=database_name)
        self.cursor = self.connection.cursor()
